{% extends 'layout.html' %}

{% block content %}
    <div class="luffy-container">
        <div class="panel panel-default">
            <div class="panel-heading">{{ title }}</div>
            <div class="panel-body">
                <form class="form-horizontal" method="post" novalidate>
                    {% csrf_token %}
                    <div class="col-sm-12">
                        {% for field in form %}
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">{{ field.label }}：</label>
                                    <div class="col-sm-9">
                                        {{ field }}
                                        {{ field.errors.0 }}
                                    </div>
                                </div>
                            </div>

                        {% endfor %}
                    </div>
                    <div class="col-sm-12">
                        <div class="col-sm-6">
                            <div class="col-sm-offset-3 col-sm-9">
                                <input class="btn btn-primary btn-sm" type="submit" value="保存" name="_save">
                                <input class="btn btn-primary btn-sm" type="submit" value="保存并继续增加" name="_add_another">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

{% endblock %}